#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

void my_qort(int arr[], int count);
int main()
{
    int num = 0;
    scanf("%d", &num);

    int input = 0;
    int count = 0;
    int arr[num];
    int flag = 1;
    for (int i = 0; i < num; i++)
    {
        scanf("%d", &input);
        if (i == 0)
        {
            arr[0] = input;
            count++;
        }
        else
        {
            for (int j = 0; j < count; j++)
            {
                if (input == arr[j])
                {
                    flag = 0;
                }
            }
            if (flag == 1)
            {
                arr[count] = input;
                count++;
            }
            flag = 1;
        }
    }

    my_qort(arr, count);
    for (int i = 0; i < count; i++)
    {
        printf("%d ", arr[i]);
    }

    return 0;
}

void my_qort(int arr[], int count)
{
    for (int i = 0; i < count - 1; i++)
    {
        for (int j = 0; j < count - 1 - i; j++)
        {
            int temp = 0;
            if (arr[j] > arr[j + 1])
            {
                temp = arr[j];
                arr[j] = arr[j + 1];
                arr[j + 1] = temp;
            }
        }
    }
}

